let defaultState = {
    value: 123,
    list: ["塞尔达传说-旷野之息", "马里奥奥德赛", "精灵宝可梦剑盾", "异度之刃2"],
    object: {
        name: "张三",
        age: 19
    }
};

export default (state = defaultState, action) => {
    if (action.type === "input_change_value") {
        let newState = JSON.parse(JSON.stringify(state));
        newState.value = action.value;
        return newState;
    }
    if (action.type === "input_change_list") {
        let newState = JSON.parse(JSON.stringify(state));
        newState.list = action.list;
        console.log(newState, '<--newState')
        return newState;
    }
    return state;
}